3.2.45 \(\int \cos ^2(a+b x) \sin (2 a+2 b x) \, dx\) [145]

Optimal. Leaf size=15 \[ -\frac {\cos ^4(a+b x)}{2 b} \]

[Out]

-1/2*cos(b*x+a)^4/b

________________________________________________________________________________________

Rubi [A]
time = 0.03, antiderivative size = 15, normalized size of antiderivative = 1.00, number of steps used = 3, number of rules used = 3, integrand size = 18, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.167, Rules used = {4372, 2645, 30} \begin {gather*} -\frac {\cos ^4(a+b x)}{2 b} \end {gather*}

Antiderivative was successfully verified.

[In]

Int[Cos[a + b*x]^2*Sin[2*a + 2*b*x],x]

[Out]

-1/2*Cos[a + b*x]^4/b

Rule 30

Int[(x_)^(m_.), x_Symbol] :> Simp[x^(m + 1)/(m + 1), x] /; FreeQ[m, x] && NeQ[m, -1]

Rule 2645

Int[(cos[(e_.) + (f_.)*(x_)]*(a_.))^(m_.)*sin[(e_.) + (f_.)*(x_)]^(n_.), x_Symbol] :> Dist[-(a*f)^(-1), Subst[
Int[x^m*(1 - x^2/a^2)^((n - 1)/2), x], x, a*Cos[e + f*x]], x] /; FreeQ[{a, e, f, m}, x] && IntegerQ[(n - 1)/2]
 &&  !(IntegerQ[(m - 1)/2] && GtQ[m, 0] && LeQ[m, n])

Rule 4372

Int[(cos[(a_.) + (b_.)*(x_)]*(e_.))^(m_.)*sin[(c_.) + (d_.)*(x_)]^(p_.), x_Symbol] :> Dist[2^p/e^p, Int[(e*Cos
[a + b*x])^(m + p)*Sin[a + b*x]^p, x], x] /; FreeQ[{a, b, c, d, e, m}, x] && EqQ[b*c - a*d, 0] && EqQ[d/b, 2]
&& IntegerQ[p]

Rubi steps

\begin {align*} \int \cos ^2(a+b x) \sin (2 a+2 b x) \, dx &=2 \int \cos ^3(a+b x) \sin (a+b x) \, dx\\ &=-\frac {2 \text {Subst}\left (\int x^3 \, dx,x,\cos (a+b x)\right )}{b}\\ &=-\frac {\cos ^4(a+b x)}{2 b}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]
time = 0.01, size = 15, normalized size = 1.00 \begin {gather*} -\frac {\cos ^4(a+b x)}{2 b} \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[Cos[a + b*x]^2*Sin[2*a + 2*b*x],x]

[Out]

-1/2*Cos[a + b*x]^4/b

________________________________________________________________________________________

Maple [B] Leaf count of result is larger than twice the leaf count of optimal. \(29\) vs. \(2(13)=26\).
time = 0.14, size = 30, normalized size = 2.00

method result size
default \(-\frac {\cos \left (2 x b +2 a \right )}{4 b}-\frac {\cos \left (4 x b +4 a \right )}{16 b}\) \(30\)
risch \(-\frac {\cos \left (2 x b +2 a \right )}{4 b}-\frac {\cos \left (4 x b +4 a \right )}{16 b}\) \(30\)
norman \(\frac {x \left (\tan ^{3}\left (\frac {a}{2}+\frac {x b}{2}\right )\right )+x \tan \left (\frac {a}{2}+\frac {x b}{2}\right ) \left (\tan ^{2}\left (x b +a \right )\right )+\frac {3 \tan \left (\frac {a}{2}+\frac {x b}{2}\right ) \tan \left (x b +a \right )}{b}-x \tan \left (\frac {a}{2}+\frac {x b}{2}\right )+\frac {x \tan \left (x b +a \right )}{2}-3 x \left (\tan ^{2}\left (\frac {a}{2}+\frac {x b}{2}\right )\right ) \tan \left (x b +a \right )-x \left (\tan ^{3}\left (\frac {a}{2}+\frac {x b}{2}\right )\right ) \left (\tan ^{2}\left (x b +a \right )\right )+\frac {x \left (\tan ^{4}\left (\frac {a}{2}+\frac {x b}{2}\right )\right ) \tan \left (x b +a \right )}{2}-\frac {2 \left (\tan ^{2}\left (\frac {a}{2}+\frac {x b}{2}\right )\right )}{b}+\frac {2 \left (\tan ^{2}\left (\frac {a}{2}+\frac {x b}{2}\right )\right ) \left (\tan ^{2}\left (x b +a \right )\right )}{b}-\frac {3 \left (\tan ^{3}\left (\frac {a}{2}+\frac {x b}{2}\right )\right ) \tan \left (x b +a \right )}{b}}{\left (1+\tan ^{2}\left (\frac {a}{2}+\frac {x b}{2}\right )\right )^{2} \left (1+\tan ^{2}\left (x b +a \right )\right )}\) \(227\)

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(cos(b*x+a)^2*sin(2*b*x+2*a),x,method=_RETURNVERBOSE)

[Out]

-1/4*cos(2*b*x+2*a)/b-1/16*cos(4*b*x+4*a)/b

________________________________________________________________________________________

Maxima [A]
time = 0.29, size = 26, normalized size = 1.73 \begin {gather*} -\frac {\cos \left (4 \, b x + 4 \, a\right ) + 4 \, \cos \left (2 \, b x + 2 \, a\right )}{16 \, b} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cos(b*x+a)^2*sin(2*b*x+2*a),x, algorithm="maxima")

[Out]

-1/16*(cos(4*b*x + 4*a) + 4*cos(2*b*x + 2*a))/b

________________________________________________________________________________________

Fricas [A]
time = 2.71, size = 13, normalized size = 0.87 \begin {gather*} -\frac {\cos \left (b x + a\right )^{4}}{2 \, b} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cos(b*x+a)^2*sin(2*b*x+2*a),x, algorithm="fricas")

[Out]

-1/2*cos(b*x + a)^4/b

________________________________________________________________________________________

Sympy [B] Leaf count of result is larger than twice the leaf count of optimal. 133 vs. \(2 (12) = 24\).
time = 0.43, size = 133, normalized size = 8.87 \begin {gather*} \begin {cases} - \frac {x \sin ^{2}{\left (a + b x \right )} \sin {\left (2 a + 2 b x \right )}}{4} - \frac {x \sin {\left (a + b x \right )} \cos {\left (a + b x \right )} \cos {\left (2 a + 2 b x \right )}}{2} + \frac {x \sin {\left (2 a + 2 b x \right )} \cos ^{2}{\left (a + b x \right )}}{4} - \frac {\sin ^{2}{\left (a + b x \right )} \cos {\left (2 a + 2 b x \right )}}{2 b} + \frac {3 \sin {\left (a + b x \right )} \sin {\left (2 a + 2 b x \right )} \cos {\left (a + b x \right )}}{4 b} & \text {for}\: b \neq 0 \\x \sin {\left (2 a \right )} \cos ^{2}{\left (a \right )} & \text {otherwise} \end {cases} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cos(b*x+a)**2*sin(2*b*x+2*a),x)

[Out]

Piecewise((-x*sin(a + b*x)**2*sin(2*a + 2*b*x)/4 - x*sin(a + b*x)*cos(a + b*x)*cos(2*a + 2*b*x)/2 + x*sin(2*a
+ 2*b*x)*cos(a + b*x)**2/4 - sin(a + b*x)**2*cos(2*a + 2*b*x)/(2*b) + 3*sin(a + b*x)*sin(2*a + 2*b*x)*cos(a +
b*x)/(4*b), Ne(b, 0)), (x*sin(2*a)*cos(a)**2, True))

________________________________________________________________________________________

Giac [A]
time = 0.41, size = 13, normalized size = 0.87 \begin {gather*} -\frac {\cos \left (b x + a\right )^{4}}{2 \, b} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cos(b*x+a)^2*sin(2*b*x+2*a),x, algorithm="giac")

[Out]

-1/2*cos(b*x + a)^4/b

________________________________________________________________________________________

Mupad [B]
time = 0.15, size = 13, normalized size = 0.87 \begin {gather*} -\frac {{\cos \left (a+b\,x\right )}^4}{2\,b} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(cos(a + b*x)^2*sin(2*a + 2*b*x),x)

[Out]

-cos(a + b*x)^4/(2*b)

________________________________________________________________________________________